/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    max-width: 800px;
    width: 100%;
}

.birthday-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
}

h1 {
    color: #ff69b4;
    margin-bottom: 30px;
    font-size: 2.5em;
}

/* 照片轮播样式 */
.photo-carousel {
    margin: 30px 0;
    position: relative;
}

.carousel-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 10px;
}

.carousel-slides {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.slide {
    min-width: 100%;
    height: 300px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-prev, .carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.7);
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 20px;
    border-radius: 50%;
    transition: background 0.3s;
}

.carousel-prev:hover, .carousel-next:hover {
    background: rgba(255, 255, 255, 0.9);
}

.carousel-prev {
    left: 10px;
}

.carousel-next {
    right: 10px;
}

/* 蛋糕样式 */
.cake-container {
    margin: 40px 0;
    position: relative;
}

.cake {
    width: 100px;
    height: 100px;
    background: #ff69b4;
    border-radius: 50%;
    position: relative;
    margin: 0 auto;
    cursor: pointer;
}

.candle {
    width: 10px;
    height: 30px;
    background: #fff;
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
}

.flame {
    width: 15px;
    height: 30px;
    background: #ffd700;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    animation: flicker 1s infinite;
}

@keyframes flicker {
    0%, 100% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(0.9); }
}

.cake-text {
    margin-top: 20px;
    color: #666;
    font-size: 0.9em;
}

/* 消息样式 */
.message {
    margin: 40px 0;
    padding: 20px;
    background: rgba(255, 192, 203, 0.1);
    border-radius: 10px;
}

.message p {
    margin: 15px 0;
    line-height: 1.6;
    color: #333;
}

/* 音乐控制按钮 */
.music-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #fff;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
}

.music-toggle:hover {
    transform: scale(1.1);
}

.music-toggle.playing {
    animation: rotate 3s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 响应式设计 */
@media (max-width: 600px) {
    .birthday-card {
        padding: 20px;
    }

    h1 {
        font-size: 1.8em;
    }

    .slide {
        height: 200px;
    }
}

/* 烟花效果 */
.firework {
    position: fixed;
    pointer-events: none;
    z-index: 999;
}

.firework-particle {
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    transform-origin: center;
    animation: firework-explosion 1s ease-out forwards;
}

@keyframes firework-explosion {
    0% {
        transform: translate(0, 0);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty));
        opacity: 0;
    }
}
